import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listPurchaseApply(query) {
  return request({
    url: '/hotel/purchaseApply/list',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getPurchaseApply(purchaseApplyId) {
  return request({
    url: '/hotel/purchaseApply/' + purchaseApplyId,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addPurchaseApply(data) {
  return request({
    url: '/hotel/purchaseApply',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updatePurchaseApply(data) {
  return request({
    url: '/hotel/purchaseApply',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delPurchaseApply(purchaseApplyId) {
  return request({
    url: '/hotel/purchaseApply/' + purchaseApplyId,
    method: 'delete'
  })
}

export function getSupply() {
  return request({
    url: '/hotel/purchaseApply/getSupply',
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function approve(data) {
  return request({
    url: '/hotel/purchaseApply/approve',
    method: 'post',
    data: data
  })
}

// 新增【请填写功能名称】
export function reject(data) {
  return request({
    url: '/hotel/purchaseApply/reject',
    method: 'post',
    data: data
  })
}

export function purchaseTask(data) {
  return request({
    url: '/hotel/supplyPurchase/purchaseTask',
    method: 'post',
    data: data
  })
}

